<template>

    <div id="app" :style="currentBackground">
      <router-view/>
      <button @click="nextBackground">切换背景</button>
    </div>
    

</template>

<script>
import { mapGetters, mapActions } from 'vuex';

export default {
  name: 'BackgroundSwitcher',
   computed: {
    ...mapGetters(['currentBackground'])  // 使用 Vuex getter
  },
  methods: {
    ...mapActions(['nextBackground'])  // 使用 Vuex action
  }

}
</script>

<style lang="scss">

</style>
